package fr.kraml;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

public class MyListView extends ListView
{
    public MyListView(Context context)
    {
        super(context);
    }
    public MyListView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
    }
    public MyListView(Context context, AttributeSet attrs, int defStyle)
    {
        super(context, attrs, defStyle);
    }

    public void SetOnResizeListener(MyOnResizeListener orlExt)
    {
        orl = orlExt;
    }

    @Override
    protected void onSizeChanged(int xNew, int yNew, int xOld, int yOld)
    {
        super.onSizeChanged(xNew, yNew, xOld, yOld);

        if(orl != null)
        {
            orl.OnResize(this.getId(), xNew, yNew, xOld, yOld);
        }
    }

    MyOnResizeListener orl = null;
 }


